<?php
/**
 * Created by PhpStorm.
 * User: ericzheng
 * Date: 14/12/18
 * Time: 下午8:55
 */
IN_FRAMEWORK===true or die("非法登陆");
class Putty{
    static private $obj;
    private function __construct($config,$router){
        $controller = $router['controller'];
        $action = $router['action'];
        //echo $controller.'   '.$action;
        $controller = ucwords($controller);
        $controller = new $controller;
        $controller->$action();
    }
    public static function getSingletonInstance($config,$router){
        if(!(self::$obj instanceof self)){
            self::$obj = new self($config,$router);
        }
        return self::$obj;
    }
    public function getController(){

    }
    public function getView(){

    }
    public function getModel(){

    }
}